1. Field of the Invention
The present invention relates generally to an improved data processing system and in particular, to a method, apparatus, and computer usable code for determining processor utilization. Still more particularly, the present invention relates to a method, apparatus, and computer usable code for determining processor utilization when processor frequencies change.
2. Description of the Related Art
In order to reduce heat and power consumption, a data processing system may change the frequency of one or more processors. Alternatively, different processors in the same data processing system may have different fixed frequencies. The dynamic frequency changes may be caused by a variety of reasons. For example, a detection of overheating or excessive power consumption may cause a reduction in frequency in one or more processors. Additionally, a desire to reduce power consumption in a portable data processing system, such as a laptop, is another reason for changing frequencies based on usage. Other conditions also may cause changes in processor frequencies. For example, changes in processor frequencies may be based upon information about an application. For example, having knowledge that an application has a large number of cache misses may cause a change of processor frequency to reduce those cache misses.
Current performance tools used to identify the amount of time a processor is idle measures and reports processor utilization in which relative times during which a processor is busy, idle, or interrupt state is identified through cycles spent in each state for each processor. Further, if different processors have different frequencies, the use of cycles to identify the times during which different states occur also may become misleading.